#include "stdafx.h"
#include "FlashInfo.h"

#ifndef __NUVOTON__
#define USE_FLASH_PID_INFO_TABLE
#define USE_FLASH_DID_INFO_TABLE
#endif

FLASH_PID_INFO_BASE_T gsPidInfo;
FLASH_DID_INFO_BASE_T gsDidInfo;

void *GetInfo(unsigned int uPID,
			  FLASH_PID_INFO_BASE_T *pInfo)
{
#ifdef USE_FLASH_PID_INFO_TABLE
	static FLASH_PID_INFO_BASE_T g_FlashPIDs[] =
	{
		//16/07/25
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005200}, //M052LAN
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005203}, //M052ZAN
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005400}, //M054LAN
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005403}, //M054ZAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005800}, //M058LAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005803}, //M058ZAN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005A00}, //M0516LAN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005A03}, //M0516ZAN
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005200}, //M052LBN
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005203}, //M052ZBN
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005400}, //M054LBN
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005403}, //M054ZBN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005800}, //M058LBN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005803}, //M058ZBN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005A00}, //M0516LBN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10005A03}, //M0516ZBN
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005200}, //M052LDN
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005203}, //M052ZDN
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005400}, //M054LDN
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005403}, //M054ZDN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005800}, //M058LDN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005803}, //M058ZDN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005A00}, //M0516LDN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20005A03}, //M0516ZDN
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005200}, //M052LDE
		{   8*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005203}, //M052ZDE
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005400}, //M054LDE
		{  16*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005403}, //M054ZDE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005800}, //M058LDE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005803}, //M058ZDE
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005A00}, //M0516LDE
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005A03}, //M0516ZDE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005818}, //M058SFAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005813}, //M058SZAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005810}, //M058SLAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00005816}, //M058SSAN
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x00205100}, //MINI51LAN
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x00205103}, //MINI51ZAN
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x00205104}, //MINI51TAN
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00205200}, //MINI52LAN
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00205203}, //MINI52ZAN
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00205204}, //MINI52TAN
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00205400}, //MINI54LAN
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00205403}, //MINI54ZAN
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00205404}, //MINI54TAN
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x20205100}, //MINI51LDE
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x20205103}, //MINI51ZDE
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x20205104}, //MINI51TDE
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x20205105}, //MINI51FDE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x20205200}, //MINI52LDE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x20205203}, //MINI52ZDE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x20205204}, //MINI52TDE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x20205205}, //MINI52FDE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x20205400}, //MINI54LDE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x20205403}, //MINI54ZDE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x20205404}, //MINI54TDE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x20205405}, //MINI54FDE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    5*512,    0x00A05800}, //MINI58LDE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    5*512,    0x00A05803}, //MINI58ZDE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    5*512,    0x00A05804}, //MINI58TDE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    5*512,    0x00A05805}, //MINI58FDE
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x00505100}, //MINI51XLAE
		{   4*1024,   0*1024,   2*1024,    0x00001000,   2*1024,    0x00505102}, //MINI51XZAE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00505200}, //MINI52XLAE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00505203}, //MINI52XZAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00505400}, //MINI54XLAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00505403}, //MINI54XZAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00505406}, //MINI54XFHC
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00505500}, //MINI55LDE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00505503}, //MINI55ZDE
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00295A00}, //NUC029LAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00295804}, //NUC029TAN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00295824}, //NUC029CIG1
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00295A03}, //NUC029ZAN
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00295415}, //NUC029FAE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10010008}, //NUC100LC1BN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10010005}, //NUC100LD1BN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10010004}, //NUC100LD2BN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10010017}, //NUC100RC1BN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10010014}, //NUC100RD1BN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10010013}, //NUC100RD2BN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x00010003}, //NUC100LD3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00010000}, //NUC100LE3AN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x00010012}, //NUC100RD3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00010009}, //NUC100RE3AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00010022}, //NUC100VD2AN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x00010021}, //NUC100VD3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00100018}, //NUC100VE3AN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30010008}, //NUC100LC1DN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30010005}, //NUC100LD1DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x30010004}, //NUC100LD2DN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x30010003}, //NUC100LD3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x30010000}, //NUC100LE3DN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30010017}, //NUC100RC1DN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30010014}, //NUC100RD1DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x30010013}, //NUC100RD2DN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x30010012}, //NUC100RD3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x30010009}, //NUC100RE3DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x30010022}, //NUC100VD2DN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x30010021}, //NUC100VD3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x30010018}, //NUC100VE3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x40010018}, //NUC100VE3DE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10012008}, //NUC120LC1BN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10012005}, //NUC120LD1BN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10012004}, //NUC120LD2BN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10012017}, //NUC120RC1BN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x10012014}, //NUC120RD1BN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10012013}, //NUC120RD2BN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x00012003}, //NUC120LD3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00120000}, //NUC120LE3AN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x00012012}, //NUC120RD3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00012009}, //NUC120RE3AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00012022}, //NUC120VD2AN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x00012021}, //NUC120VD3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00012018}, //NUC120VE3AN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30012008}, //NUC120LC1DN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30012005}, //NUC120LD1DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x30012004}, //NUC120LD2DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x40012004}, //NUC120LD2DE
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x30012003}, //NUC120LD3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x30012000}, //NUC120LE3DN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30012035}, //NUC120RC1DN
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30012032}, //NUC120RD1DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x30012031}, //NUC120RD2DN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x30012030}, //NUC120RD3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x30012027}, //NUC120RE3DN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x30012022}, //NUC120VD2DN
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   4*1024,    0x30012021}, //NUC120VD3DN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x30012018}, //NUC120VE3DN
		{  32*1024,   0*1024,   4*1024,    0x00008000,    9*512,    0x00012145}, //NUC121ZC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    9*512,    0x00012125}, //NUC121LC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    9*512,    0x00012105}, //NUC121SC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    9*512,    0x00012545}, //NUC125ZC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    9*512,    0x00012525}, //NUC125LC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,    9*512,    0x00012505}, //NUC125SC2AE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00012235}, //NUC122ZC1AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00012231}, //NUC122ZD2AN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00012208}, //NUC122LC1AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00012204}, //NUC122LD2AN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x00012226}, //NUC122SC1AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00012222}, //NUC122SD2AN
		{  32*1024,   4*1024,  12*1024,    0x0001F000,   4*1024,    0x00012345}, //NUC123ZC2AN1
		{  64*1024,   4*1024,  20*1024,    0x0001F000,   4*1024,    0x00012355}, //NUC123ZD4AN0
		{  32*1024,   4*1024,  12*1024,    0x0001F000,   4*1024,    0x00012325}, //NUC123LC2AN1
		{  64*1024,   4*1024,  20*1024,    0x0001F000,   4*1024,    0x00012335}, //NUC123LD4AN0
		{  32*1024,   4*1024,  12*1024,    0x0001F000,   4*1024,    0x00012305}, //NUC123SC2AN1
		{  64*1024,   4*1024,  20*1024,    0x0001F000,   4*1024,    0x00012315}, //NUC123SD4AN0
		{  32*1024,   4*1024,  12*1024,    0x0001F000,   4*1024,    0x10012345}, //NUC123ZC2AE1
		{  64*1024,   4*1024,  20*1024,    0x0001F000,   4*1024,    0x10012355}, //NUC123ZD4AE0
		{  32*1024,   4*1024,  12*1024,    0x0001F000,   4*1024,    0x10012325}, //NUC123LC2AE1
		{  64*1024,   4*1024,  20*1024,    0x0001F000,   4*1024,    0x10012335}, //NUC123LD4AE0
		{  32*1024,   4*1024,  12*1024,    0x0001F000,   4*1024,    0x10012305}, //NUC123SC2AE1
		{  64*1024,   4*1024,  20*1024,    0x0001F000,   4*1024,    0x10012315}, //NUC123SD4AE0
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20013008}, //NUC130LC1CN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x20013004}, //NUC130LD2CN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x20013000}, //NUC130LE3CN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20013017}, //NUC130RC1CN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x20013013}, //NUC130RD2CN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x20013009}, //NUC130RE3CN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x20013018}, //NUC130VE3CN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20014008}, //NUC140LC1CN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x20014004}, //NUC140LD2CN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x20014000}, //NUC140LE3CN
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x20014017}, //NUC140RC1CN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x20014013}, //NUC140RD2CN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x20014009}, //NUC140RE3CN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x20014018}, //NUC140VE3CN
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10013103}, //NUC131LC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10013100}, //NUC131LD2AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10013113}, //NUC131SC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10013110}, //NUC131SD2AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10051803}, //M0518LC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10051800}, //M0518LD2AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10051813}, //M0518SC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x10051810}, //M0518SD2AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x00051930}, //M0519VE3AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x00051920}, //M0519SE3AE
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   8*1024,    0x00051922}, //M0519SD3AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x00051900}, //M0519LE3AE
		{  64*1024,   4*1024,  16*1024,    0x0001F000,   8*1024,    0x00051902}, //M0519LD3AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00020007}, //NUC200LC2AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00020004}, //NUC200LD2AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00020000}, //NUC200LE3AN
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00020034}, //NUC200SC2AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00020031}, //NUC200SD2AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00020027}, //NUC200SE3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00020018}, //NUC200VE3AN
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00022007}, //NUC220LC2AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00022004}, //NUC220LD2AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00022000}, //NUC220LE3AN
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00022034}, //NUC220SC2AN
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   4*1024,    0x00022031}, //NUC220SD2AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00022027}, //NUC220SE3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x00022018}, //NUC220VE3AN
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   4*1024,    0x40022000}, //NUC220LE3AE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   8*1024,    0x40013017}, //NUC230RC1AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10023007}, //NUC230LC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10023004}, //NUC230LD2AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x10023000}, //NUC230LE3AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10023034}, //NUC230SC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10023031}, //NUC230SD2AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x10023027}, //NUC230SE3AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x10023018}, //NUC230VE3AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10024007}, //NUC240LC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10024004}, //NUC240LD2AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x10024000}, //NUC240LE3AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10024034}, //NUC240SC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x10024031}, //NUC240SD2AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x10024027}, //NUC240SE3AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x10024018}, //NUC240VE3AE
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110029}, //NANO100ZC2AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110028}, //NANO100ZD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110027}, //NANO100ZD3AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110025}, //NANO100LC2AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110019}, //NANO100LD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110018}, //NANO100LD3AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110023}, //NANO100SC2AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110016}, //NANO100SD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110015}, //NANO100SD3AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110013}, //NANO100VD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110012}, //NANO100VD3AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110043}, //NANO100LC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x0011003F}, //NANO100LD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x0011003E}, //NANO100LD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00110036}, //NANO100LE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110042}, //NANO100SC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x0011003D}, //NANO100SD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x0011003C}, //NANO100SD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00110034}, //NANO100SE3BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110040}, //NANO100KC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110039}, //NANO100KD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110038}, //NANO100KD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00110030}, //NANO100KE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111042}, //NANO110SC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x0011103D}, //NANO110SD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x0011103C}, //NANO110SD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00111034}, //NANO110SE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111043}, //NANO110RC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00111044}, //NANO110RD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00111045}, //NANO110RD3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111040}, //NANO110KC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00111039}, //NANO110KD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00111038}, //NANO110KD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00111030}, //NANO110KE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00112029}, //NANO120ZC2AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00112028}, //NANO120ZD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00112027}, //NANO120ZD3AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00112025}, //NANO120LC2AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00112019}, //NANO120LD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00112018}, //NANO120LD3AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00112023}, //NANO120SC2AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00112016}, //NANO120SD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00112015}, //NANO120SD3AN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00112013}, //NANO120VD2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00112012}, //NANO120VD3AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00112043}, //NANO120LC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x0011203F}, //NANO120LD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x0011203E}, //NANO120LD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00112036}, //NANO120LE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00112042}, //NANO120SC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x0011203D}, //NANO120SD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x0011203C}, //NANO120SD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00112034}, //NANO120SE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00112040}, //NANO120KC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00112039}, //NANO120KD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00112038}, //NANO120KD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00112030}, //NANO120KE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00113042}, //NANO130SC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x0011303D}, //NANO130SD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x0011303C}, //NANO130SD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00113034}, //NANO130SE3BN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00113040}, //NANO130KC2BN
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00113039}, //NANO130KD2BN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00113038}, //NANO130KD3BN
		{ 123*1024,   0*1024,  16*1024,    0x0001EC00,   4*1024,    0x00113030}, //NANO130KE3BN
		{  16*1024,   0*1024,   4*1024,    0x00004000,   4*1024,    0x00110202}, //NANO102ZB1AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110204}, //NANO102ZC2AN
		{  16*1024,   0*1024,   4*1024,    0x00004000,   4*1024,    0x00110206}, //NANO102LB1AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110208}, //NANO102LC2AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110212}, //NANO102SC2AN
		{  16*1024,   0*1024,   4*1024,    0x00004000,   4*1024,    0x00111202}, //NANO112LB1AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111204}, //NANO112LC2AN
		{  16*1024,   0*1024,   4*1024,    0x00004000,   4*1024,    0x00111206}, //NANO112SB1AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111208}, //NANO112SC2AN
		{  16*1024,   0*1024,   4*1024,    0x00004000,   4*1024,    0x00111210}, //NANO112RB1AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111212}, //NANO112RC2AN
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00111216}, //NANO112VC2AN
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110301}, //Nano103SD3AE
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110302}, //Nano103SD2AE
		{  64*1024,   0*1024,   4*1024,    0x00010000,   4*1024,    0x00110303}, //Nano103SD1AE
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110304}, //Nano103LD3AE
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110305}, //Nano103LD2AE
		{  64*1024,   0*1024,   4*1024,    0x00010000,   4*1024,    0x00110306}, //Nano103LD1AE
		{  64*1024,   0*1024,  16*1024,    0x00010000,   4*1024,    0x00110307}, //Nano103ZD3AE
		{  64*1024,   0*1024,   8*1024,    0x00010000,   4*1024,    0x00110308}, //Nano103ZD2AE
		{  64*1024,   0*1024,   4*1024,    0x00010000,   4*1024,    0x00110309}, //Nano103ZD1AE
		{  32*1024,   0*1024,  16*1024,    0x00008000,   4*1024,    0x00110316}, //Nano103SC3AE
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110310}, //Nano103SC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,   4*1024,    0x00110311}, //Nano103SC1AE
		{  32*1024,   0*1024,  16*1024,    0x00008000,   4*1024,    0x00110317}, //Nano103LC3AE
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110312}, //Nano103LC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,   4*1024,    0x00110313}, //Nano103LC1AE
		{  32*1024,   0*1024,  16*1024,    0x00008000,   4*1024,    0x00110318}, //Nano103ZC3AE
		{  32*1024,   0*1024,   8*1024,    0x00008000,   4*1024,    0x00110314}, //Nano103ZC2AE
		{  32*1024,   0*1024,   4*1024,    0x00008000,   4*1024,    0x00110315}, //Nano103ZC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B01400}, //NM1120DC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B01420}, //NM1120FC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B01440}, //NM1120EC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B01450}, //NM1120XC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B01460}, //NM1120TC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B01470}, //NM1120ZC1AE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00B01300}, //NM1120DB0AE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00B01320}, //NM1120FB0AE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00B01340}, //NM1120EB0AE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00B01350}, //NM1120XB0AE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00B01360}, //NM1120TB0AE
		{  16*1024,   0*1024,   2*1024,    0x00004000,   2*1024,    0x00B01370}, //NM1120ZB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00605400}, //NM1200LBAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00605404}, //NM1200TBAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00605407}, //NM1100XBAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00605408}, //NM1100FBAE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00605403}, //NM1200ZBAE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00605200}, //NM1200LAAE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00605204}, //NM1200TAAE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00605207}, //NM1100XAAE
		{   8*1024,   0*1024,   2*1024,    0x00002000,   2*1024,    0x00605208}, //NM1100FAAE
		{  36*1024,   0*1024,   8*1024,    0x00009000,   4*1024,    0x00032003}, //NM1320LC2AE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005810}, //NM1330LC1AE
		{  64*1024,   4*1024,   4*1024,    0x0001F000,   4*1024,    0x30005A10}, //NM1330LD2AE
		{ 128*1024,   0*1024,  16*1024,    0x00020000,   8*1024,    0x00353030}, //NM1530VE3AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x00353032}, //NM1530VD3AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x00352023}, //NM1520RD2AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x00352025}, //NM1520RC2AE
		{  64*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x00352003}, //NM1520LD2AE
		{  32*1024,   4*1024,   8*1024,    0x0001F000,   8*1024,    0x00352005}, //NM1520LC2AE
		{  32*1024,   4*1024,   4*1024,    0x0001F000,   8*1024,    0x00351006}, //NM1510LC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81000}, //NM1810FC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81200}, //NM1812FC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81010}, //NM1810EC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81110}, //NM1811EC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81020}, //NM1810ZC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81020}, //NM1811ZC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81030}, //NM1810XC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81130}, //NM1811XC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81040}, //NM1810LC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81310}, //NM1813FC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81320}, //NM1813EC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81330}, //NM1813ZC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81340}, //NM1813LC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81710}, //NM1817UC1AE
		{   59*512,   0*1024,   4*1024,    0x00007600,   2*1024,    0x00B81720}, //NM1817YC1AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682100}, //NM1821FB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682010}, //NM1820EB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682020}, //NM1820ZB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682030}, //NM1820LB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682410}, //NM1824FB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682320}, //NM1823EB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682330}, //NM1823ZB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682340}, //NM1823LB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682710}, //NM1827UB0AE
		{   35*512,   0*1024,   2*1024,    0x00004600,   2*1024,    0x00682720}, //NM1827YB0AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00044212}, //NUC442RG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00044210}, //NUC442RI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00044209}, //NUC442VG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00044207}, //NUC442VI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00044206}, //NUC442KG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00044204}, //NUC442KI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00044203}, //NUC442JG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00044201}, //NUC442JI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00047212}, //NUC472VG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00047210}, //NUC472VI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00047209}, //NUC472KG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00047207}, //NUC472KI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00047206}, //NUC472JG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00047204}, //NUC472JI8AE
		{ 256*1024,   0*1024,  64*1024,    0x00040000,  16*1024,    0x00047203}, //NUC472HG8AE
		{ 512*1024,   0*1024,  64*1024,    0x00080000,  16*1024,    0x00047201}, //NUC472HI8AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845130}, //M451VG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845131}, //M451VE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845120}, //M451RG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845121}, //M451RE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845100}, //M451LG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845101}, //M451LE6AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945130}, //M451VD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945131}, //M451VC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945120}, //M451RD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945121}, //M451RC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945110}, //M451SD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945111}, //M451SC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945100}, //M451LD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945101}, //M451LC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x009451F0}, //M451YD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x009451F1}, //M451YC3AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845230}, //M452VG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845231}, //M452VE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845220}, //M452RG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845221}, //M452RE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845200}, //M452LG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845201}, //M452LE6AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945230}, //M452VD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945231}, //M452VC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945220}, //M452RD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945221}, //M452RC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945210}, //M452SD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945211}, //M452SC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945200}, //M452LD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945201}, //M452LC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x009452F0}, //M452YD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x009452F1}, //M452YC3AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845330}, //M453VG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845331}, //M453VE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845320}, //M453RG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845321}, //M453RE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845300}, //M453LG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845301}, //M453LE6AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945330}, //M453VD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945331}, //M453VC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945320}, //M453RD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945321}, //M453RC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945310}, //M453SD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945311}, //M453SC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945300}, //M453LD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945301}, //M453LC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x009453F0}, //M453YD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x009453F1}, //M453YC3AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845020}, //M451MRG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845021}, //M451MRE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845000}, //M451MLG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845001}, //M451MLE6AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945020}, //M451MRD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945021}, //M451MRC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945010}, //M451MSD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945011}, //M451MSC3AE
		{  72*1024,   0*1024,  16*1024,    0x00012000,   4*1024,    0x00945000}, //M451MLD3AE
		{  40*1024,   0*1024,  16*1024,    0x0000A000,   4*1024,    0x00945001}, //M451MLC3AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845700}, //M4LEDLG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845701}, //M4LEDLE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845720}, //M4LEDRG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845721}, //M4LEDRE6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845401}, //M4TKLE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845400}, //M4TKLG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845421}, //M4TKRE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845420}, //M4TKRG6AE
		{ 128*1024,   0*1024,  32*1024,    0x00020000,   4*1024,    0x00845431}, //M4TKVE6AE
		{ 256*1024,   0*1024,  32*1024,    0x00040000,   4*1024,    0x00845430}, //M4TKVG6AE

		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48140}, //M481KIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48141}, //M481KGDAE		
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48110}, //M481SIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48111}, //M481SGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48100}, //M481LIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48101}, //M481LGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D481E0}, //M481ZIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D481E1}, //M481ZGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48250}, //M482JIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48251}, //M482JGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48240}, //M482KIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48241}, //M482KGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48230}, //M482VIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48231}, //M482VGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48210}, //M482SIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48211}, //M482SGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48200}, //M482LIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48201}, //M482LGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48350}, //M483JIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48351}, //M483JGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48340}, //M483KIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48341}, //M483KGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48330}, //M483VIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48331}, //M483VGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48310}, //M483SIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48311}, //M483SGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48300}, //M483LIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48301}, //M483LGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48550}, //M485JIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48551}, //M485JGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48540}, //M485KIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48541}, //M485KGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48530}, //M485VIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48531}, //M485VGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48580}, //M485OIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48581}, //M485OGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48510}, //M485SIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48511}, //M485SGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48750}, //M487JIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48751}, //M487JGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48740}, //M487KIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48741}, //M487KGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D48710}, //M487SIDAE
		{ 256*1024,   0*1024, 160*1024,    0x0003FFFF,   4*1024,    0x00D48711}, //M487SGDAE
		{ 512*1024,   0*1024, 160*1024,    0x0007FFFF,   4*1024,    0x00D480FF}, //M480TEST
	};

	unsigned int i;
	for(i = 0; i < sizeof(g_FlashPIDs) / sizeof(g_FlashPIDs[0]); ++i)
	{
		if(g_FlashPIDs[i].uPID == uPID)
		{
			*pInfo = g_FlashPIDs[i];
			break;
		}
	}

	if(!(i < sizeof(g_FlashPIDs) / sizeof(g_FlashPIDs[0])))
		return NULL;

	return pInfo;
#else
	return NULL;
#endif
}

bool GetInfo(unsigned int uPID,
			 unsigned int uConfig0,
			 unsigned int uConfig1,
			 unsigned int *puLDROM_Addr,
			 unsigned int *puAPROM_Addr,
			 unsigned int *puNVM_Addr,
			 unsigned int auSPROM_Addr[3],
			 unsigned int *puKPROM_Addr,
			 unsigned int *puLDROM_Size,
			 unsigned int *puAPROM_Size,
			 unsigned int *puNVM_Size,
			 unsigned int auSPROM_Size[3],
			 unsigned int *puKPROM_Size)
{
	FLASH_PID_INFO_BASE_T flashInfo;
	memset(&gsPidInfo, 0, sizeof(FLASH_PID_INFO_BASE_T));
	if(GetInfo(uPID, &flashInfo) == NULL)
		return false;
	memcpy(&gsPidInfo, &flashInfo, sizeof(FLASH_PID_INFO_BASE_T));

	if((uPID & 0xFFFFFF00) == 0x00044200
	|| (uPID & 0xFFFFFF00) == 0x00047200
	|| (uPID & 0xFFFFF000) == 0x00845000
	|| (uPID & 0xFFFFF000) == 0x00945000) //NUC400/M451
	{
		*puLDROM_Addr = NUC4XX_FLASH_LDROM_ADDR;
		*puLDROM_Size = flashInfo.uISPFlashSize;
		*puAPROM_Addr = NUC4XX_FLASH_APROM_ADDR;

		auSPROM_Addr[0] = 0xFFFFFFFF;
		auSPROM_Size[0] = 0;
		auSPROM_Addr[1] = 0xFFFFFFFF;
		auSPROM_Size[1] = 0;
		auSPROM_Addr[2] = 0xFFFFFFFF;
		auSPROM_Size[2] = 0;

		if(flashInfo.uDataFlashSize == 0
			&& (uConfig0 & NUC4XX_FLASH_CONFIG_DFEN) == 0)
		{
			*puNVM_Addr = (uConfig1 & 0x000FF800UL);
			*puAPROM_Size = (flashInfo.uProgramMemorySize > *puNVM_Addr)
								? *puNVM_Addr : flashInfo.uProgramMemorySize;
			*puNVM_Size = flashInfo.uProgramMemorySize - *puAPROM_Size;
		}
		else
		{
			*puAPROM_Size = flashInfo.uProgramMemorySize;
			*puNVM_Addr = flashInfo.uDataFlashStartAddress;
			*puNVM_Size = flashInfo.uDataFlashSize;
		}

		*puKPROM_Addr = 0xFFFFFFFF;
		*puKPROM_Size = 0;
	}
	else
	{
		*puLDROM_Addr = NUC1XX_FLASH_LDROM_ADDR;
		*puLDROM_Size = flashInfo.uISPFlashSize;
		*puAPROM_Addr = NUC1XX_FLASH_APROM_ADDR;

		//SPROM
		if((uPID & 0xFFFFFF00) == 0x00A05800
		|| (uPID & 0xFFFFFF00) == 0x00110200
		|| (uPID & 0xFFFFFF00) == 0x00111200
		|| (uPID & 0xFFFFFF00) == 0x00110300) //Mini58/Nano112/Nano103
		{
			auSPROM_Addr[0] = NANO112_FLASH_SPROM_ADDR;
			auSPROM_Size[0] = NANO112_FLASH_SPROM_SIZE;
			auSPROM_Addr[1] = 0xFFFFFFFF;
			auSPROM_Size[1] = 0;
			auSPROM_Addr[2] = 0xFFFFFFFF;
			auSPROM_Size[2] = 0;
		}
		else if((uPID & 0xFFFFF000) == 0x00B01000) //NM1120
		{
			auSPROM_Addr[0] = NM1120_FLASH_SPROM_ADDR;
			auSPROM_Size[0] = NM1120_FLASH_SPROM_SIZE;
			auSPROM_Addr[1] = NM1120_FLASH_SPROM2_ADDR;
			auSPROM_Size[1] = NM1120_FLASH_SPROM_SIZE;
			auSPROM_Addr[2] = NM1120_FLASH_SPROM3_ADDR;
			auSPROM_Size[2] = NM1120_FLASH_SPROM_SIZE;
		}
		else
		{
			auSPROM_Addr[0] = 0xFFFFFFFF;
			auSPROM_Size[0] = 0;
			auSPROM_Addr[1] = 0xFFFFFFFF;
			auSPROM_Size[1] = 0;
			auSPROM_Addr[2] = 0xFFFFFFFF;
			auSPROM_Size[2] = 0;
		}

		//DataFlash
		if((uPID & 0xFFFFFF00) == 0x10012300
		|| (uPID & 0xFFFFFF00) == 0x00012300
		|| (uPID & 0xFFFFFF00) == 0x10013100
		|| (uPID & 0xFFFFFF00) == 0x10051800
		|| (uPID & 0xFFFFFF00) == 0x00032000) //NUC123/NUC131/M0518/NM1320
		{
			if((uConfig0 & NUC1XX_FLASH_CONFIG_DFVSEN) == 0)
			{
				flashInfo.uProgramMemorySize += flashInfo.uDataFlashSize;
				flashInfo.uDataFlashSize = 0;
			}
		}

		if(flashInfo.uDataFlashSize == 0
			&& (uConfig0 & NUC1XX_FLASH_CONFIG_DFEN) == 0)
		{
			*puNVM_Addr = (uConfig1 & 0x000FFE00UL);
			*puAPROM_Size = (flashInfo.uProgramMemorySize > *puNVM_Addr)
								? *puNVM_Addr : flashInfo.uProgramMemorySize;
			*puNVM_Size = flashInfo.uProgramMemorySize - *puAPROM_Size;
		}
		else
		{
			*puAPROM_Size = flashInfo.uProgramMemorySize;
			*puNVM_Addr = flashInfo.uDataFlashStartAddress;
			*puNVM_Size = flashInfo.uDataFlashSize;
		}

		//KPROM
		if((uPID & 0xFFFFFF00) == 0x00110300) //Nano103
		{
			*puKPROM_Addr = NANO103_FLASH_KPROM_ADDR;
			*puKPROM_Size = NANO103_FLASH_KPROM_SIZE;
		}
		else
		{
			*puKPROM_Addr = 0xFFFFFFFF;
			*puKPROM_Size = 0;
		}
	}

	return true;
}

/* 8051 1T Series */
void *GetInfo_N76E1T(unsigned int uDID,
					 FLASH_DID_INFO_BASE_T *pInfo)
{
	unsigned int uSID = (uDID & 0xFFFFFF00);

	if ((uSID != 0x00002100) && 
		(uSID != 0x00002F00) && 
		(uSID != 0x00003600))
		return NULL;

	pInfo->uDID = uDID;

	pInfo->uRAMSize = 512;
	if (uSID == 0x00003600)
		pInfo->uRAMSize <<= 1;

	pInfo->uProgramMemorySize	  = 18 * 1024;
	pInfo->uDataFlashSize		  = 0;
	pInfo->uDataFlashStartAddress = 0;

	if ((uDID & 0xFF) == 0x40)
	{
		pInfo->uDataFlashSize = 10 * 1024;
	}

	pInfo->uProgramMemorySize -= pInfo->uDataFlashSize;
	pInfo->uDataFlashStartAddress = pInfo->uProgramMemorySize;

	return pInfo;
}

bool GetInfo_N76E1T(unsigned int uDID,
					unsigned int uConfig0,
					unsigned int uConfig1,
					unsigned int *puLDROM_Addr,
					unsigned int *puAPROM_Addr,
					unsigned int *puNVM_Addr,
					unsigned int *puLDROM_Size,
					unsigned int *puAPROM_Size,
					unsigned int *puNVM_Size)
{
	FLASH_DID_INFO_BASE_T flashInfo;
	//unsigned int uSID = (uDID & 0xFFFFFF00);

	if (GetInfo_N76E1T(uDID, &flashInfo) == NULL)
		return false;
	memcpy(&gsDidInfo, &flashInfo, sizeof(FLASH_DID_INFO_BASE_T));

	unsigned int uLDSEL = (uConfig0 >> 8) & 0x07;

	*puLDROM_Size = (0x07 - uLDSEL) * 1024;
	if (*puLDROM_Size > 4096)
		*puLDROM_Size = 4096;

	*puLDROM_Addr = 18 * 1024 - *puLDROM_Size;

	*puAPROM_Addr = 0;
	*puAPROM_Size = flashInfo.uProgramMemorySize;
	*puNVM_Addr = flashInfo.uDataFlashStartAddress;
	*puNVM_Size = flashInfo.uDataFlashSize;

	if (flashInfo.uDataFlashSize != 0)
	{
		*puNVM_Size -= *puLDROM_Size;
	}
	else
	{
		*puAPROM_Size -= *puLDROM_Size;
	}

	return true;
}

